﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit" />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta content="telephone=no" name="format-detection" />
    <title>邑大水行管理系统</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="Scripts/bootstrap-3.3.4-dist/css/bootstrap.min.css" rel="stylesheet" />
    <link href="Styles/login.css" rel="stylesheet" />
    <link href="Styles/loginDialog.css" rel="stylesheet" />
    <script src="Scripts/commen_js/jquery-2.0.2.min.js"></script>
    <script src="Scripts/commen_js/jquery.cookie.min.js"></script>
    <script type="text/javascript" src="js/sh.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script src="Scripts/commen_js/js.js"></script>
    <script src="Scripts/commen_js/json2.js"></script>
    <script src="Scripts/respond.min.js" type="text/javascript"></script>
    <script src="Scripts/commen_js/jquery.md5.js"></script>
    <script src="Scripts/layer-v1.9.3/layer/layer.js" type="text/javascript"></script>
    <script src="Scripts/commen_js/MJ_JSComment.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {
            $("#login").click(function () {
                var user = $("#account").val();
                var pwd = $("#password").val();
                if (isUndefinedNullOrEmpty(user) || isUndefinedNullOrEmpty(pwd)) {
                    alert("请输入用户名或密码");
                    return false;
                }
                else {
                    poststr = "{\"type\":\"login\",\"username\":\"" + user + "\",\"password\":\"" + $.md5(pwd) + "\"}";
                    mj_js_ajax("json", poststr, login);
                }

            })


        })
        function login(data) {
            var result = data;
            if (result.result == "ok") {
                var username = $("#account").val();
                $.cookie("manager_name", username);
                location.href = "Ask_Record.aspx?r=" + Math.random();
            }
            else {

                layer.alert('<div >账号或密码错误</div>', {
                    icon: 2,
                    title: '来自页面信息', //不显示标题
                    skin: 'layer-ext-moon'
                }
            )
            }
        }
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("body").append("<div id='mask'></div>");
            $("#mask").addClass("mask").fadeIn("slow");
            $("#LoginBox").fadeIn("slow");
            //文本框不允许为空---按钮触发
            $("#loginbtn").on('click', function () {
                var txtName = $("#txtName").val();
                var txtPwd = $("#txtPwd").val();
                alert("uvgruvg");
            });
        })
     


    </script>
</head>

<body>
    

<div class="box">
		<div class="login-box">
			<div class="login-title text-center">
				<h1><small>邑大水行</small></h1>
			</div>
			<div class="login-content ">
			<div class="form">
			<form action="#" method="post">
				<div class="form-group">
					<div class="col-xs-12  ">
						<div class="input-group">
							<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                            <input type="text" id="account" name="username" class="form-control" placeholder="请输入用户名" />
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-xs-12  ">
						<div class="input-group">
							<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                            <input type="text" id="password" name="password" class="form-control" placeholder="请输入密码" />
						</div>
					</div>
				</div>
				<div class="form-group form-actions">
					<div class="col-xs-4 col-xs-offset-4 ">
						<button type="button" id="login" class="btn btn-sm btn-info" style=" width:100%; margin:0 auto; font-weight:bold; letter-spacing:2px; ">登录</button>
					</div>
				</div>
	
			</form>
			</div>
		</div>
	</div>
</div>
</body>
</html>